<nz-card>
  <nz-form-item>
    <nz-form-label [nzFlex]="labelWidth" nzRequired>标题</nz-form-label>
    <nz-form-control nzFlex="400px">
      <input
        nz-input
        placeholder="请输入标题"
        [(ngModel)]="formParams.title"
        [disabled]="setDisabled()"
      >
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzFlex]="labelWidth" nzRequired>副标题</nz-form-label>
    <nz-form-control nzFlex="400px">
      <input
        nz-input
        placeholder="请输入副标题"
        [(ngModel)]="formParams.subheading"
        [disabled]="setDisabled()"
      >
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzFlex]="labelWidth" nzRequired>标题主图</nz-form-label>
    <nz-form-control nzFlex="400px">
      <zdy-upload
        [(ngModel)]="formParams.img"
        [disabled]="setDisabled()"
      ></zdy-upload>
    </nz-form-control>
  </nz-form-item>

  <nz-divider></nz-divider>

  <nz-form-item>
    <nz-form-label [nzFlex]="labelWidth" nzRequired>活动内容</nz-form-label>
    <nz-form-control nzFlex="800px">
      <editor
        id="editorContent"
        [init]="editorConfig"
        [(ngModel)]="formParams.content"
        [disabled]="setDisabled()"
      ></editor>
    </nz-form-control>
  </nz-form-item>

  <nz-divider></nz-divider>

  <nz-form-item>
    <nz-form-label [nzFlex]="labelWidth" nzRequired>开始时间</nz-form-label>
    <nz-form-control nzFlex="400px">
      <nz-date-picker
        style="width: 100%;"
        nzShowTime
        [nzDisabled]="setDisabled()"
        [(ngModel)]="formParams.beginTime"
      ></nz-date-picker>
    </nz-form-control>
  </nz-form-item>
</nz-card>

<nz-card class="m-t-4">
  <div nz-row nzJustify="center">
    <button
      *ngIf="['0', '1'].includes(routeParams.type)"
      nz-button
      nzType="primary"
      [nzLoading]="submitFormLoading"
      (click)="submitForm()"
    >保存</button>
    <button
      nz-button
      nzType="default"
      class="m-l-10"
      (click)="goBack()"
    >返回</button>
  </div>
</nz-card>